package com.guijianpan.system.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.guijianpan.system.domain.UserRole;
import com.guijianpan.system.repository.UserRoleRepository;

@Service
public class UserRoleService {
	
	@Autowired
	private UserRoleRepository userRoleRepository;

	@Transactional
	public UserRole save(UserRole UserRole) {
		return userRoleRepository.save(UserRole);
	}

	public List<UserRole> findAll() {
		return (List<UserRole>) userRoleRepository.findAll();
	}

	public UserRole findOne(Long id) {
		return userRoleRepository.findOne(id);
	}

}
